package com.qwt.part_time_api.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author 君子慎独
 * @create 2021/11/21 0021 16:09
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addCorsMappings(CorsRegistry registry) {
        //    跨区设置
        registry.addMapping("/**").allowedOrigins("http://localhoat:8080/");
    }
}
